package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.StoreExamine;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.mapper.ReportMapper;
import com.ruoyi.system.mapper.StoreExamineMapper;
import com.ruoyi.system.service.StoreExamineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
@Service
public class StoreExamineServiceImpl implements StoreExamineService {
    @Autowired
    StoreExamineMapper storeExamineMapper;


    @Override
    public List<StoreExamine> selectList(StoreExamine examinePlan) {
        return storeExamineMapper.selectList(examinePlan);
    }

    @Override
    public Boolean update(StoreExamine examinePlan) {
        examinePlan.setUpdateBy(SecurityUtils.getNickName());
        examinePlan.setUpdateTime(new Date());
        return storeExamineMapper.update(examinePlan)==1;
    }

    @Override
    public Boolean deleteById(Long id) {
        return storeExamineMapper.deleteById(id)==1;
    }

    @Override
    public Boolean create(StoreExamine examinePlan) {
        return storeExamineMapper.insert(examinePlan)==1;
    }

    @Override
    public StoreExamine selectById(Long id) {
        return storeExamineMapper.selectById(id);
    }
}
